package com.ying.controller.system;

import cn.dev33.satoken.annotation.SaCheckPermission;
import com.ying.core.response.ApiResponse;
import com.ying.service.system.RoleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/role")
@Api(tags = "Role接口")
public class RoleController {

    @Autowired
    private RoleService roleService;

    @GetMapping("/find/all")
    @SaCheckPermission("role-get")
    @ApiOperation("查询全部的角色")
    public ApiResponse findAll() {
        ApiResponse success = ApiResponse.success(roleService.findAll());
        return success;
    }



}
